{% extends "base_stu.html" %}
{% block content %}
    <div class="row">
        <div class="col-sm-12">
            <div class="page-header">
                <h1><span class="text-light-gray">问题生成/ </span>选择答题</h1>
            </div>
            <div class="panel" style="margin-bottom: 70px;">
                <div class="panel-heading">
                    <span class="panel-title">填空 &amp; 答题</span>
                </div>
                <div class="panel-body">
                    <ul id="uidemo-tabs-default-demo" class="nav nav-tabs">
                        <li class="active">
                            <a href="#uidemo-tabs-default-demo-home" data-toggle="tab">错题集 <span
                                    class="label label-success">{{ number }}</span></a>
                        </li>
                        <li class="">
                            <a href="#uidemo-tabs-default-demo-profile" data-toggle="tab">已做习题 <span
                                    class="badge badge-primary">{{ number }}</span></a>
                        </li>
                    </ul>
                    <div class="tab-content tab-content-bordered">
                        <!-- 错题展示 -->
                        <div class="tab-pane fade active in" id="uidemo-tabs-default-demo-home">

                            <div class="panel panel-danger" style="margin:20px 200px 10px 20px">
<form>
                                    {% for wrongInfo in wrong %}
                                        <div class="panel-heading">
                                            <span class="panel-title">{{ wrongInfo.questionID }}</span>
                                            <div class="panel-heading-controls">
                                                <div class="panel-heading-icon"><i class="fa fa-inbox"></i></div>
                                            </div>
                                        </div>
                                        <div class="panel-body">
                                            <div class='text-bg' style="margin-left: 30px;">
                                                {{ wrongInfo.question }}
                                            </div>
                                            <div class="col-md-4">
                                                <P style="color: #68ff69;margin:20px 200px 10px 40px">
                                                    正确答案: {{ wrongInfo.rightAnswer }}</P>
                                            </div>
                                            <div class="col-md-4">
                                                <P style="color: red;margin:20px 200px 10px 40px">
                                                    我的答案:{{ wrongInfo.wrongAnswer }}</P>
                                            </div>
                                        </div>
                                    {% endfor %}
                                </form>
                            </div>
                        </div>

                        <!-- 错题展示 -->
                        <!-- 我的题目 -->
                        <div class="tab-pane fade" id="uidemo-tabs-default-demo-profile">
                            {% for answered in allAnsweredCompletion %}
                                <div class="panel-heading">
                                    <span class="panel-title">{{ answered.questionID }}</span>
                                    <div class="panel-heading-controls">
                                        <div class="panel-heading-icon"><i class="fa fa-inbox"></i></div>
                                    </div>
                                </div>
                                <div class="panel-body">
                                    <div class='text-bg' style="margin-left: 30px;">
                                        {{ answered.question }}
                                    </div>
                                    <div class="col-md-4">
                                        <P style="color: #68ff69;margin:20px 200px 10px 40px">
                                            正确答案: {{ answered.rightAnswer }}</P>
                                    </div>
                                    <div class="col-md-4">
                                        <P style="color: red;margin:20px 200px 10px 40px">
                                            我的答案:{{ answered.wrongAnswer }}</P>
                                    </div>
                                </div>
                            {% endfor %}
                        </div>
                    </div>
                    <!-- 我的题目 -->
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        init.push(function () {
            // Javascript code here
        })
        window.LanderApp.start(init);
    </script>
{% endblock %}